package com.ozx.rabbitmqconsumer.controller;

import com.ozx.rabbitmqconsumer.service.MessageService;
import com.ozx.rabbitmqconsumer.service.impl.MessageServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: MessageController
 * @Description: 集成RabbitMQ实现延迟消息
 * @Author ou.zhenxing
 * @Date 2021/6/23 16:32
 * @Version： 2.0
 **/
@RestController
public class MessageController {

    @Autowired
    private MessageService messageService;

    @GetMapping("send")
    public void sendMessage(String queueName,String msg){
        messageService.sendMsg(queueName,msg);
    }

    @GetMapping("delaySend")
    public void sendDelayMessage(String queueName,String message){
        messageService.sendDelayMessage(queueName, message);
    }
}
